<!--
@author	Yi Bo <etng2004@gmail.com>
@version	$Id: client_add.php 66 2007-09-10 08:13:09Z etng2004 $
@copyrithg	2006-2007 ETE.CN
@license 	PHP Version 3.0 {@link http://www.php.net/license/3_0.txt}
-->
<?php
$this->declareVars();
require_once(dirname(__FILE__) . '/_meta_client.php');
echo $this->render('header.php');
@$client = $this->client;
?>
<?php
if($this->message):
?>
<div class="Tips"><?php echo $this->message; ?></div>
<?php
endif;
?>
<div class="Content">
<div class="Tips">当出现撞单提醒时，请到“<a href="<?php echo $this->module_url; ?>/client/exist">撞单查询</a>”去查询，可以得到该客户是由谁联系的，可以与该同事进行必要的沟通。比如杭州易特科技有限公司，可以用易特这两个字在撞单查询里搜索看是否已经存在
</div>

<form action="<?php echo $this->base_url; ?>/add/" method="post" enctype="multipart/form-data" name="frmAddClient" id="frmAddClient">
<table cellpadding="0" cellspacing="0" border="0">
<tr class="tblhead">
	<td colspan="3">新增客户</td>
</tr>
	<?php
	if($this->S_staff['client_type'] == 'ALL'):
	?>
    <tr class="tblbody">
      <td width="15%"><?php echo $meta['client']['fields']['client_type_code'];?>：</td>
      <td width="85%">
      <?php
  echo $this->formSelect('fields[client][client_type_code]', @$client['client_type_code'], array('id'=>'field_client_type_code'), $this->client_types);
      ?>
      </td>

    </tr>
    <?php
   	else:
    ?>
      <input type="hidden" name="fields[client][client_type_code]" value="<?php echo @$this->staff['client_type'];?>"/>
    <?php
    endif;
    ?>

    <tr class="tblbody">
      <td width="15%"><?php echo $meta['client']['fields']['trade_type_id'];?>：</td>
      <td width="85%">
       <?php
      echo $this->formSelect('fields[client][trade_type_id]', @$client['trade_type_id'], array('id'=>'field_trade_type_id'), $this->trade_types);
      ?></td>

    </tr>
    <tr class="tblbody">
      <td width="15%"><?php echo $meta['client']['fields']['stage'];?>：</td>
      <td width="85%">
       <?php
      echo $this->formSelect('fields[client][stage]', @$client['stage'], array('id'=>'field_stage_id'), $LANG['CLIENT_STAGE']);
      ?></td>

    </tr>
    <tr class="tblbody">
      <td width="15%"><?php echo $meta['client']['fields']['company'];?>：</td>
      <td width="85%"><input type="text" name="fields[client][company]" value="<?php echo @$client['company'];?>" id="field_company" /></td>

    </tr>
    <tr class="tblbody">
      <td width="15%"><?php echo $meta['client']['fields']['website'];?>：</td>
      <td width="85%"><input type="text" name="fields[client][website]" value="<?php echo @$client['website'];?>" id="field_website" /><div class="HintMsg">必填，并且提交格式为
 http://www.xxxx.com 前面一定要加 http://，后面不能加/</div></td>
    </tr>    <tr class="tblbody">
      <td width="15%"><?php echo $meta['client']['fields']['alexa'];?>：</td>
      <td width="85%"><input type="text" name="fields[client][alexa]" value="<?php echo @$client['alexa'];?>" id="field_alexa" /></td>

    </tr>
    <tr class="tblbody">
      <td width="15%"><?php echo $meta['client']['fields']['phone'];?>：</td>
      <td width="85%"><input type="text" name="fields[client][phone]" value="<?php echo @$client['phone'];?>" id="field_phone" /></td>

    </tr>
    <tr class="tblbody">
      <td width="15%"><?php echo $meta['client']['fields']['fax'];?>：</td>
      <td width="85%"><input type="text" name="fields[client][fax]" value="<?php echo @$client['fax'];?>" id="field_fax" /></td>

    </tr>
    <tr class="tblbody">
      <td width="15%"><?php echo $meta['client']['fields']['email'];?>：</td>
      <td width="85%"><input type="text" name="fields[client][email]" value="<?php echo @$client['email'];?>" id="field_email" /></td>

    </tr>
    <tr class="tblbody">
      <td width="15%"><?php echo $meta['client']['fields']['address'];?>：</td>
      <td width="85%"><input type="text" name="fields[client][address]" value="<?php echo @$client['address'];?>" id="field_address" /></td>

    </tr>
    <tr class="tblbody">
      <td width="15%"><?php echo $meta['client']['fields']['postcode'];?>：</td>
      <td width="85%"><input type="text" name="fields[client][postcode]" value="<?php echo @$client['postcode'];?>" id="field_postcode" /></td>

    </tr>
    <tr class="tblbody">
      <td width="15%"><?php echo $meta['client']['fields']['memo'];?>：</td>
      <td width="85%"><?php
	echo $this->fckeditor('fields[client][memo]', @$client['memo'], 'Basic');
	?></td>

    </tr><tr class="tblfoot">
	<td colspan="3" align="center"><input type="submit" value="提交" /></td>
</tr>
</table>
</form>
<script type="text/javascript">
	$(document).ready(function () {
	});
</script>
</div>
<?php echo $this->render('footer.php');?>